<?php
$this->breadcrumbs=array();

$this->sidebarTop = array(
    'label' => Yii::t('BackEnd', 'Config manager'),
    'link' => "#"
);

$this->moduleName = "Config";

$this->slidebar = Backend::getModuleSlideBar('Setting', '/config/index', 'configuration');

$this->menu=array(
	array('label'=>Yii::t('BackEnd', 'Create'), 'url'=>array('create'), 'visible'=>UserAccess::checkAccess('ConfigCreate')),
	array('label'=>Yii::t('BackEnd', 'Manage'), 'url'=>array('admin'), 'visible'=>UserAccess::checkAccess('ConfigAdmin')),
);

$this->title = Yii::t('BackEnd', 'List').": ". Yii::t('BackEnd', 'Configs');
?>

<input type="hidden" id="moduleName" value="Config"/>
<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'config-grid',
	'dataProvider'=>$dataProvider,
    'selectableRows' => 0,
	'columns'=>array(
		'id',
        array(
            'header'=> Yii::t('BackEnd', 'Config Group'),
            'name'=>'group_id',
            'value'=> "ConfigGroup::model()->findByPk(\$data->group_id)->name",
            'htmlOptions' => array('style'=>'text-align:left;')
        ),
		array(
            'name'=>'name',
            'value'=> $data->name,
            'htmlOptions' => array('style'=>'text-align:left;')
        ),
		'value',
        array(
            'header'=> Yii::t('BackEnd', 'Html Tag Name'),
            'name'=>'html_tag',
            'value'=> $data->html_tag,
            'htmlOptions' => array('style'=>'text-align:left;')
        ),
		array(
			'class'=>'CButtonColumn',
            'template'=> UserAccess::checkAccess("ConfigDelete")? '{view}{update}{delete}':'{view}{update}',
		),
	),
)); ?>
